
import { MyRequestOptions,HttpResponse } from './type';
import request from '@/utils/api/request';

//当前用户信息
export const queryUserInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/queryUserInfo`;
  return request.get(option);
};

// 获取用户IM账号
export const getUserImInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/getUserImInfo`;
  return request.get(option);
};

// 更新签名
export const updateAutograph = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/updateAutograph`;
  return request.get(option);
};

export const getUserFollowUsers = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/follow/queryMyCoverFollow`;
  return request.post(option);
};

export const cancelFollow = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/follow/cancelFollow`;
  return request.post(option);
};

export const saveFollow = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/follow/saveFollow`;
  return request.post(option);
};

export const queryMyFollow = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/follow/queryMyFollow`;
  return request.post(option);
};


export const logOffUser = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/logOffUser`;
  return request.post(option);
};


export const saveAppComplaintsAndOpinions = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/saveAppComplaintsAndOpinions`;
  return request.post(option);
};


export const unBindWx = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/unBindWx`;
  return request.post(option);
};

export const bindWx = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/bindWx`;
  return request.post(option);
};



export const setAppUserInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/setAppUserInfo`;
  return request.post(option);
};



export const myStoreSimpleInfo = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/myStoreSimpleInfo`;
  return request.get(option);
};

export const hasQiangQiang = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/trends/hasQiangQiang`;
  return request.get(option);
};


export const dailySign = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/dailySign`;
  return request.get(option);
};

//是否是会员
export const openVipFlag = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/openVipFlag`;
  return request.get(option);
};

export const loginCheck = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/loginCheck`;
  return request.get(option);
};

export const userSimple = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/info/userSimple`;
  return request.get(option);
};

export const userOrderStatics = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/order/userOrderStatics`;
  return request.get(option);
};


export const queryVpsOrderCount = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/vps/vpsOrderCount`;
  return request.get(option);
};

export const queryWorkOrderCount = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/work/order/queryWorkOrderCount`;
  return request.get(option);
};

export const totalMesCount = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/appMessage/totalMesCount`;
  return request.get(option);
};

export const queryUserByUserId = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/user/queryUserByUserId`;
  return request.get(option);
};
export const storeOrderStatics = (
  option: MyRequestOptions = {}
): Promise<HttpResponse> => {
  option.url = `/app/store/storeOrderStatics`;
  return request.get(option);
};

